
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="<?php echo yii::app()->theme->baseUrl;  ?>/assets/css/common.css">
<link rel="stylesheet" href="<?php echo yii::app()->theme->baseUrl;  ?>/assets/statics/js/artDialog6/css/ui-dialog.css">
<script src="<?php echo yii::app()->theme->baseUrl;  ?>/assets/js/jquery-1.11.1.min.js"></script>
<script src="<?php echo yii::app()->theme->baseUrl;  ?>/assets/statics/js/artDialog6/js/dialog-min.js"></script>

</head>
<body>
<div class="login-content">
	<form>
		<div class="login-account">
			<input type="text" class="login-acc" placeholder="邮箱/手机号">
        </div>
        <div class="login-pw" style="margin-bottom:25px;">
            <input type="text" class="login-acc"  placeholder="密码">
        </div>
        <a href="" title="妈咪街账号登录" style="margin-bottom: 30px;margin-right: -4px;float: right;text-decoration: none;font-size:12px;color:#ffafc0;">忘记密码？</a>
        <div class="login-submit">
            <button>登录</button>
        </div>
        <div class="login-register">
            <a >注册</a>
        </div>

    </form>
</div>
<div class="register-content">
    
    <form>
        <div class="login-account">
            <input type="text" class="login-acc" placeholder="邮箱/手机号">
        </div>
        <div class="login-codeO">
            <input type="text" class="login-acc"  placeholder="验证码">
        </div>
        <div class="login-codeForPhone">
            <input type="text" class="login-forphone"  placeholder="短信验证码">
        </div>
        <div class="register-time">
            <span>重新发送</span>
            <strong>49</strong>
        </div>
        <div class="login-mail">
            <input type="text" class="login-acc"  placeholder="邮箱">
        </div>
        <div class="register-pw">
            <input type="text" class="login-acc"  placeholder="密码">
        </div>
        <button type="button" class="register-confirm">注册</button>
        <div class="register-bom">
            <div class="register-move">
                <input type="checkbox" id="bg">
                <label for="bg" class="signUp-bg" id="registerUpBg"></label>
                <span>我已经阅读并同意遵守网站<em>使用条款</em>和<em>隐私条款</em></span>  
                
            </div>
            <div class="register-bom-info">
                <span>如果您已拥有妈咪街账户，则可在此</span>
                <button>登录</button>
            </div>
        </div>
    </form>
</div>
</body>

<script type="text/javascript">
    $(function(){
        $(".register-content").hide();
      
        $(".indexLogin").click(function() {
            
            var d = dialog({
                title: '登录',
                url:'/user/user/loginRegister'
            });
            // d.width(450)
            d.showModal();

            $(".ui-dialog-header").attr("id", "index-ui-bg");
            $(".ui-dialog-title").css({
                "font-size" : "22px",
                "color" : "#666666",
                "font-weight" : "normal"
            })
           $(".ui-dialog-grid input").focus(function() {
               $(".login-content .login-account").css({
                   "border" : "1px solid #cfcfcf"
               })
               $(".login-content .login-pw").css({
                   "border" : "1px solid #cfcfcf"
               })
               $(this).parent().css({
                   "border" : "1px solid #ff7694"
               });
           })

        })


        $(".login-content input").focus(function() {
            $(".login-content .login-account").css({
                "border" : "1px solid #cfcfcf",
            });
            $(".login-content .login-pw").css({
                "border" : "1px solid #cfcfcf",
            });
            $(this).parent().css({
                "border" : "1px solid #ff7694",
            });
        });


        $(".login-register a").click(function() {
            $(".login-content").hide();
            // $(".register-content").show();
            $(window.top.document).find(".ui-dialog-content").animate({
                "height" : "400px"
            },500,function() {
                $(".register-content").show();
            });
            $(window.top.document).find(".ui-dialog-title").text("注册");
        });
        
        var registerUpBg = document.getElementById('registerUpBg'),
            bg = document.getElementById('bg'),
            change = true;
        bg.onclick = function() {
            if(change) {
                registerUpBg.style.background = "url(/themes/mmj/assets/images/" + "indi_icon.png)";
                change = false;
            } else {
                registerUpBg.style.background = "url(/themes/mmj/assets/images/" + "indi_icon_off.png)";
                change = true;
            }
        }

        $(".register-bom-info button").click(function() {
            $(".register-content").hide();
            $(window.top.document).find(".ui-dialog-title").text("登录");
            });
            $(window.top.document).find(".ui-dialog-content").animate({
                    "height" : "268px"
            },600,function() {
                // $(".login-content").show();
            });
        $(".register-confirm").click(function() {
            if($(".register-content input").val() == "") {
                if($(".register-move").hasClass("register-mov")) {
                    $(".register-move").removeClass("register-mov")
                } else {
                    again();

                }
                
            } 
        })

        function again() {
            $(".register-move").addClass("register-mov");
        }
        
        $(".register-content input[type='text']").focus(function() {
           $(".register-content input[type='text']").parent().css({
                "border" : "1px solid #cfcfcf"
           });
           $(this).parent().css({
               "border" : "1px solid #ff7694"
           });
           
        })

    })
        

</script>


</html>

